import { QuetionTypeMap } from '@/common'
import { Button, TextArea } from 'antd-mobile'
import React from 'react'
interface IProp {
    data: QuestionModel
}
export default function Fill({ data }: IProp) {
    return (
        <div className='fill'>
            <div className="title-container">
                <div className='type'>{QuetionTypeMap[data.questionType]}</div>
                <div className='title'>{data.title}</div>
            </div>
            {/* 如果是编程题还有代码 ,由于是富文本，要使用下面的方法渲染 */}
            <div className="code" dangerouslySetInnerHTML={{ __html: data.content }}>
            </div>
            <TextArea placeholder="请输入答案" rows={5}></TextArea>
            <div className='answer'>
                <Button color="primary" fill="outline" >确定</Button>
            </div>
        </div>
    )
}
